package org.example.constuctorbean;

import org.example.xmlbean.XmlContextService;
import org.springframework.beans.factory.annotation.Autowired;

public class ConsBuildService {

  @Autowired
  private final XmlContextService xmlContextService;

  public ConsBuildService(XmlContextService xmlContextService) {
    System.out.println("    I'm Constructor Bean Start");
    this.xmlContextService = xmlContextService;
    xmlContextService.printName();
    System.out.println("    I'm Constructor Bean End");
  }

  public void printName() {
    System.out.println("    I'm a Constructor bean with arg : "  );
    xmlContextService.printName();
  }
}
